package com.aqgj.SysArea.dao;

import com.aqgj.SysArea.bean.SysArea;
import com.aqgj.util.BaseDaoImpl;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("SysAreaDao")
public class SysAreaDao extends BaseDaoImpl<SysArea> {

    //根据pid，区域级别获取行政区域
    public List<SysArea> getAreaByPidAndLevel(Integer levels, String pid){
        String hql="from SysArea a where a.levels=? and a.pid=?";
        return this.createQuery(hql,new Object[]{levels,pid}).getResultList();

    }

}